module.exports = {
    lintOnSave: false,
    configureWebpack: {
        mode: "development"
    },

    devServer: {
        // 设置主机地址
        host: "localhost",
        // 设置默认端口
        port: '8080',
        // 自动打开浏览器
        open: true,
        proxy: {
            '/api': {
                target: 'http://localhost:8080',
                // 改变header中的origin
                ws: true,
                changeOrigin: true,
                pathRewrite:{
                    '^/api':'/mock'
                }
            },
            '/foo': {
                target: '<other_url>'
            },
            '/dianying': {
                target: "http://m.maoyan.com/",
                changeOrigin: true
            }
        }
    }
}
